﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Model
{
    /// <summary>
    /// 
    ///</summary>
    public class TableColumn
    {
        /// <summary>
        /// 
        /// </summary>
        [Key]
        public string Id { get; set; }

        /// <summary>
        /// 列表主键
        /// </summary>
        public string TableId { get; set; }

        /// <summary>
        /// 列名
        /// </summary>
        public string ColumnName { get; set; }

        /// <summary>
        /// 列显示名称
        /// </summary>
        public string ColumnCnName { get; set; }

        /// <summary>
        /// 数据类型
        /// </summary>
        public string ColumnType { get; set; }

        /// <summary>
        /// 占用字节数
        /// </summary>
        public int Size { get; set; }

        /// <summary>
        /// 是否主键
        /// 默认值: ((0))
        /// </summary>
        public bool? IsKey { get; set; }

        /// <summary>
        /// 是否为空
        /// 默认值: ((0))
        /// </summary>
        public bool? IsNull { get; set; }

        /// <summary>
        /// 是否显示
        /// 默认值: ((1))
        /// </summary>
        public bool? IsDisplay { get; set; } = true;

        /// <summary>
        /// 是否排序
        /// 默认值: ((0))
        /// </summary>
        public bool? IsSort { get; set; }

        /// <summary>
        /// 是否查询
        /// 默认值: ((0))
        /// </summary>
        public bool? IsSearch { get; set; }

        /// <summary>
        /// 是否编辑
        /// 默认值: ((0))
        /// </summary>
        public bool? IsEdit { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public int? SortKey { get; set; }

        /// <summary>
        /// 列宽
        /// </summary>
        public string? ColumnWidth { get; set; }

        /// <summary>
        /// 查询类型
        /// </summary>
        public string? SearchType { get; set; }

        /// <summary>
        /// 编辑类型
        /// </summary>
        public string? EditType { get; set; }

        /// <summary>
        /// 数据源
        /// </summary>
        public string? DataSource { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 删除标记
        /// </summary>
        public bool? IsDelete { get; set; }
    }
}
